<template>
	<!-- 消息详情 -->
	<view class="message_details">
		<view class="empty"></view>
		<view class="details_title">
			{{messageDetails.title}}
		</view>
		<view class="details_date">
			{{messageDetails.date_time}}
		</view>
		<view class="details_image">
			<image src="@/static/image/messageDetails.png" mode=""></image>
		</view>
		<view class="details_text" v-html="messageDetails.content">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				/** 资讯详情 */
				messageDetails: {},
			}
		},
		
		onLoad(option) {
			this.getMessageDetails();
		},
		
		components: { 
		},
		
		computed: {
			/** 资讯id */
			notifId () {
				return this.options.notifId;
			}
		},
		
		methods: {
			getMessageDetails() {
				let parameter = {
					notif_id: this.notifId
				};
				this.$post(this.api.getMessageDetails, parameter, 'post', { token: uni.getStorageSync('token') }).then((res) => {
					console.log(res)
					this.messageDetails = res.data;
				}).catch((err) => {
					console.log(err)
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.message_details {
		.empty {
			height: 10rpx;
			background: #F0F0F0;
		}
		.details_title {
			font-size: 32rpx;
			color: #131313;
			padding: 24rpx 32rpx 22rpx;
		}
		.details_date {
			font-size: 26rpx;
			color: #898888;
			padding: 0 0 27rpx 31rpx;
			border-bottom: 1px solid #b0b0b0;
		}
		.details_image {
			margin: 36rpx 30rpx 44rpx;
			image {
				width: 100%;
				height: 285rpx;
			}
		}
		.details_text {
			padding: 0 38rpx;
			font-size: 26rpx;
			color: #1F1F1F;
			line-height: 46rpx;
			text-align: justify;
		}
	}
</style>
